import ItemUtil from '@/ItemUtil';
import RandomUtil from '@/RandomUtil';
export default class Item_先锋盾 {
    static id = 'ratf';
    static 名称: string = '先锋盾';
    static 描述: string = '';
    static 图标: string = '';
    static 添加技能(目标: unit) {
        UnitAddAbility(目标, Item_先锋盾.id);
    }
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {}
    constructor() {
        EventManager.onBeforApplyAttack(Item_先锋盾.spellEffect);
    }
    static spellEffect(d: DamageEventData) {
        if (!ItemUtil.isUnitHasItem(d.target, Item_先锋盾.id)) return;
        let r = RandomUtil.randomPercent();
        if (r < 0.75) {
            d.lastDamage -= 75;
        }
    }
}
